/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package model.Entity.SIS;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author user12
 */
@Embeddable
public class SectionTimePK implements Serializable {
    @Basic(optional = false)
    @NotNull
    private int semester;
    @Basic(optional = false)
    @NotNull
    @Column(name = "CAMPUS_NO")
    private short campusNo;
    @Basic(optional = false)
    @NotNull
    @Column(name = "COURSE_NO")
    private short courseNo;
    @Basic(optional = false)
    @NotNull
    @Column(name = "COURSE_EDITION")
    private short courseEdition;
    @Basic(optional = false)
    @NotNull
    @Column(name = "ACTIVITY_CODE")
    private short activityCode;
    @Basic(optional = false)
    @NotNull
    private short section;
    @Basic(optional = false)
    @NotNull
    @Column(name = "DAY_CODE")
    private short dayCode;
    @Basic(optional = false)
    @NotNull
    @Column(name = "TIME_CODE")
    private short timeCode;

    public SectionTimePK() {
    }

    public SectionTimePK(int semester, short campusNo, short courseNo, short courseEdition, short activityCode, short section, short dayCode, short timeCode) {
        this.semester = semester;
        this.campusNo = campusNo;
        this.courseNo = courseNo;
        this.courseEdition = courseEdition;
        this.activityCode = activityCode;
        this.section = section;
        this.dayCode = dayCode;
        this.timeCode = timeCode;
    }

    public int getSemester() {
        return semester;
    }

    public void setSemester(int semester) {
        this.semester = semester;
    }

    public short getCampusNo() {
        return campusNo;
    }

    public void setCampusNo(short campusNo) {
        this.campusNo = campusNo;
    }

    public short getCourseNo() {
        return courseNo;
    }

    public void setCourseNo(short courseNo) {
        this.courseNo = courseNo;
    }

    public short getCourseEdition() {
        return courseEdition;
    }

    public void setCourseEdition(short courseEdition) {
        this.courseEdition = courseEdition;
    }

    public short getActivityCode() {
        return activityCode;
    }

    public void setActivityCode(short activityCode) {
        this.activityCode = activityCode;
    }

    public short getSection() {
        return section;
    }

    public void setSection(short section) {
        this.section = section;
    }

    public short getDayCode() {
        return dayCode;
    }

    public void setDayCode(short dayCode) {
        this.dayCode = dayCode;
    }

    public short getTimeCode() {
        return timeCode;
    }

    public void setTimeCode(short timeCode) {
        this.timeCode = timeCode;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) semester;
        hash += (int) campusNo;
        hash += (int) courseNo;
        hash += (int) courseEdition;
        hash += (int) activityCode;
        hash += (int) section;
        hash += (int) dayCode;
        hash += (int) timeCode;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof SectionTimePK)) {
            return false;
        }
        SectionTimePK other = (SectionTimePK) object;
        if (this.semester != other.semester) {
            return false;
        }
        if (this.campusNo != other.campusNo) {
            return false;
        }
        if (this.courseNo != other.courseNo) {
            return false;
        }
        if (this.courseEdition != other.courseEdition) {
            return false;
        }
        if (this.activityCode != other.activityCode) {
            return false;
        }
        if (this.section != other.section) {
            return false;
        }
        if (this.dayCode != other.dayCode) {
            return false;
        }
        if (this.timeCode != other.timeCode) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "model.SisSectionTimesPK[ semester=" + semester + ", campusNo=" + campusNo + ", courseNo=" + courseNo + ", courseEdition=" + courseEdition + ", activityCode=" + activityCode + ", section=" + section + ", dayCode=" + dayCode + ", timeCode=" + timeCode + " ]";
    }
    
}
